package com.coupons.business.merchantoffers.service;

import java.util.List;

import com.coupons.business.common.exception.BaseCouponsAppException;
import com.coupons.business.common.vo.MerchantOffer;
import com.coupons.business.merchantoffers.dao.IMerchantOffersDAO;
import com.coupons.business.merchantoffers.controller.IMerchantOffersManager;

public class MerchantOffersManagerService implements IMerchantOffersManager {
	IMerchantOffersDAO merchantoffersDAO;

	public IMerchantOffersDAO getMerchantoffersDAO() {
		return merchantoffersDAO;
	}

	public void setMerchantoffersDAO(IMerchantOffersDAO merchantoffersDAO) {
		this.merchantoffersDAO = merchantoffersDAO;
	}

	public IMerchantOffersDAO getMerchantOffersDAO() {
		return merchantoffersDAO;
	}

	public void setMerchantOffersDAO(IMerchantOffersDAO merchantoffersDAO) {
		this.merchantoffersDAO = merchantoffersDAO;
	}

	
	public void createMerchantOffers(MerchantOffer objaMerchantOffers)
			throws BaseCouponsAppException {
		merchantoffersDAO.createMerchantOffers(objaMerchantOffers);
	}

	
	public void updateMerchantOffers(MerchantOffer objaMerchantOffers)
			throws BaseCouponsAppException {
		merchantoffersDAO.updateMerchantOffers(objaMerchantOffers);
	}

	
	public MerchantOffer getMerchantOffers(int MerchantOffersId)
			throws BaseCouponsAppException {
		return merchantoffersDAO.getMerchantOffers(MerchantOffersId);
	}

	
	public List<MerchantOffer> getAllMerchantOffers()
			throws BaseCouponsAppException {
		return merchantoffersDAO.getAllMerchantOffers();
	}

	public List<MerchantOffer> getOffersByMerchant(int merchantId)
			throws BaseCouponsAppException
	{
		return merchantoffersDAO.getOffersByMerchant(merchantId);
	}
	
	
	public List<MerchantOffer> getOffersByCategory(int partnerId,String categoryName)
			throws BaseCouponsAppException {
		return merchantoffersDAO.getOffersByCategory(partnerId,categoryName);
	}
	
	public List<MerchantOffer> getHomePageOffers(int partnerId)throws BaseCouponsAppException
	{
		return merchantoffersDAO.getHomePageOffers(partnerId);
	}
	
	public List<MerchantOffer> getSpecialPageOffers(int partnerId)throws BaseCouponsAppException
	{
		return merchantoffersDAO.getSpecialPageOffers(partnerId);
	}
	
	public List<MerchantOffer> getOffersBySearchKey(int partnerId, String searchKey)
				throws BaseCouponsAppException 
	{
		return merchantoffersDAO.getOffersBySearchKey(partnerId, searchKey);
	}
	
}
